fixes toggle of button