Fixed bug in input.