Fix rules in DB