fix input resetting