Fix rules order