Update emulator.js