fixed some sneaky littel bugs :-)