fix some more 32/64bit incompatibilities