fixed input prediction bug