Fixed freaky button behaviour. Needs testing. But works for me.