Fixed a bug with the button lock staying on for too long.