Fix style active panel + tests

fix #793

- [x] writes tests to check for proper state