Fix bug in input