fix switch 4 state is inverted (fixes #15)