Fixed not working invert logic
First of all removed superclass check which is not really needed so that invert logic basically works again.
Second the were logical issues in the statemachine. It was possible to leave the
"inverted" state even if CTRL was pressed. This is now fixed