x64 cast fix