Fixed segfault - on with the rules
Added testing rules, works good