Added a condition to initialize UM_Member_Grid only when the directory has the 'um-members-grid' class. This avoids unintended initialization and ensures proper functionality.