fix an input bug