add patch for entity rules