fix bug in input