Add better functionality on button toggle.