forgot to reset input buffer.