Push button going through states with different actions

guix:
Edit2: Actually your problem is because you use if .. if, instead of if .. else if.

Wow, I feel stupid now. Of course it is! Thank you.