emulation mode bug fix