Fixed rules bug.