Cambareri & Brenneck, Syracuse (Melissa K. Swartz of Counsel), for Respondent-Appellant Sideria D.J.N. Tyson Blue, Macedon, for Respondent-Appellant Robert G.N. Jacqueline A. McCormick, Lyons, for Petitioner-Respondent. Michael J. Caputo, Rochester, Attorney for the Children. Appeals from an order of the Family Court, Wayne County (Arthur B. Williams, J.), entered May 18, 2023, in proceedings pursuant to Social Services Law § 384-b. The order, among other things, terminated respondents’ parental rights with respect to the subject children. It is hereby ORDERED that the order so appealed from is unanimously affirmed without costs. Memorandum: In these proceedings pursuant to Social Services Law § 384-b, respondent mother and respondent father each appeal from an order that, among other things, terminated their parental rights with respect to the subject children on the ground of permanent neglect, committed the custody and guardianship of the children to petitioner, and freed the children for adoption. Contrary to respondents’ contentions, petitioner met its burden with respect to permanent neglect by establishing that, despite its diligent efforts to encourage and strengthen respondents’ relationship with the children, respondents failed to plan for the future of the children (see Matter of Patience E. [Victoria E.], 225 AD3d 1181, 1182 [4th Dept 2024], lv denied — NY3d — [2024]; see generally Social Services Law § 384-b [7] [a]). Permanent neglect requires a determination that, although a parent is “physically and financially able” to plan for the child, the parent has not “successfully address[ed] or gain[ed] insight into the problems that led to the removal of the child and continued to prevent the child’s safe return” (Matter of Giovanni K., 62 AD3d 1242, 1243 [4th Dept 2009], lv denied 12 NY3d 715 [2009]; see Matter of Alexander S. [David S.], 130 AD3d 1463, 1463 [4th Dept 2015], lv denied 26 NY3d 910 [2015], appeal dismissed & lv denied 26 NY3d 1030 [2015], rearg denied 26 NY3d 1132 [2016]; see generally Social Services Law § 384-b [7] [a]). Here, although respondents engaged in regular visitation and participated to some extent in parenting classes, they failed to address the problems that caused the removal of the children (see Matter of Leon RR, 48 NY2d 117, 125 [1979]). The children were removed due to the deplorable conditions of the home, and those conditions remained even four years after petitioner became involved with respondents. Despite the efforts of petitioner’s personnel, police, and relatives to ameliorate those conditions, respondents’ situation did not significantly improve over time. Respondents were capable of cleaning the residence, as was evident from the condition of the residence during announced visits, but on unannounced visits that took place within days of an announced visit, caseworkers repeatedly found that the residence had been allowed to revert to its prior state. In addition to failing to maintain the residence in a safe and sanitary condition, the father failed to engage meaningfully in mental health treatment. The mother, however, engaged in treatment and was generally compliant with that treatment. Both parents engaged to some extent in parenting classes. Nevertheless, “[a]ttendance at the myriad programs and visits arranged for respondents clearly does not signal the necessary change, nor does their desire for return of the children. Of singular importance in reaching a determination as to whether respondents have actually learned to accept responsibility and modify their behavior must be an evaluation of respondents’ own testimony, particularly their credibility, as well as the evidence of witnesses (professional and nonprofessional) who have dealt with them in the various programs and observed them and the children” (Matter of Nathaniel T., 67 NY2d 838, 841-842 [1986] [emphasis added]). We thus conclude that petitioner established that, despite any minimal progress, respondents did not actually learn to accept responsibility and modify their behavior (see id.; cf. Matter of Nicole H., 24 AD3d 1054, 1056 [3d Dept 2005]). Respondents further contend that Family Court erred in refusing to address a custody petition filed by the paternal grandmother before entering the dispositional order. We note that respondents lack standing to challenge any actual determination of the grandmother’s petition (see Matter of Ty‘Shawn B. [Cassandra B.], 209 AD3d 1280, 1281 [4th Dept 2022]; see e.g. Matter of Johnson v. Johnson [appeal No. 2], 209 AD3d 1314, 1315 [4th Dept 2022]; Matter of Terrance M. [Terrance M., Sr.], 75 AD3d 1147, 1147 [4th Dept 2010]). Nevertheless, to the extent that respondents each contend that the court’s failure to address that petition affected the underlying order terminating their parental rights, we conclude that those contentions lack merit. Where, as here, a nonparent relative has filed a petition for custody of the children, “the proper procedural course would have been for the [court] to consider her custody petition in the context of a dispositional hearing in the underlying termination proceedings, wherein the court would determine the best interests of the child” (Matter of Weiss v. Weiss, 142 AD3d 507, 508 [2d Dept 2016]; see Matter of Carl G. v. Oneida County Dept. of Social Servs., 24 AD3d 1274, 1275 [4th Dept 2005]). We nevertheless conclude that “the record supports the [court's] conclusion that the child[ren]‘s best interests required continuing custody with [petitioner], so that [they] could be made available for adoption by [their] foster parents” (Matter of Violetta K. v. Mary K., 306 AD2d 480, 481 [2d Dept 2003]). The only issue at a dispositional hearing is the best interests of the children, and “a nonparent relative takes no precedence for custody over the adoptive parents selected by an authorized agency” (id.). In this case, the record from the hearing, at which the paternal grandmother testified, establishes that it was in the children’s best interests to remain with the pre-adoptive parents.