fixed checking_rules, thanks to tip from Uwe