Fixed bug with not working modification rules placed at the beginning of the rules list