fixed emulation bug