Fixed bug due to rules being populated too late