Emulator modifications + Bug fix