Fixes resetting input file