fixed issues with x86_64 compilation