You should only reset if the input changed. Right now it would reset if you press `Left` or `Right` or any other key that doesn't enter anything