Fix hanging bug with waiting for enter
Fix hanging bug with waiting for enter