some bug fixes to x86-64 tools