Fix #580 input problem