Better rules handling