fix keep rules and tests