Terminal input bug fix.