Fixed bug in emulator
Merge remote-tracking branch 'origin/master'