multiple fixes to button shutoff code

seems to be working...

applet runs nicely!