64 bit build fixes