Fix 64bit type cast warnings