State finds money to keep group homes open