fix rules()