64 bit fixes