Tweaked button code