Fixed input buffer issue at end of CPU emulation