Fixed a focus issue when Console.waitForInteraction() is called