cleanup code determining whether intepreter waits for another line of input which fixes issues with Get command