fix tools/emulator