Fix bug that crashed app on repeated button press