Reverting a button unintended side effect