Fix some x64 linux bugs