Fixing x64 bugs