Fix the input bug