Fix 64bit issues