More bugs fixed, thanks to Piter01: :-)