Fixed some console IO issues for Question 2.