fix some more obvious 64bit issues