Improved input handling in Console.