Fix for 64 bit crashes