Fix a bug in input.c.