tests for rules and some fixes for subscription setup