Fixed small bug in rules