Fix 64-bit issues