Fixes reading input