fix weird input bug