fixes bug with input