Fixed bug with repeating rule