64-bit fixes