Fix error when app have no rules