ad rules and tests
fix tests
fix tests
fix test
Merge pull request #293 from mimmi20/issue-290

Fixes #290, #291, #292