Fix getChar's bug using getLine instead.