fix some bug in input