Fixed compatibility with CiviCRM version 5.51.0 and 5.14.0