make sure the button is not clicked more than once