move input_location reset to a better spot