The 62-year-old former teacher who was fatally stabbed to death by his roommate in an East Harlem homeless shelter last year apparently suffered from a rare form of dementia that likely contributed to the erratic behavior that eventually rendered him homeless.

Deven Black was once a former middle school Social Studies teacher and librarian living in Nyack, NY with his wife and son. But starting in 2013, Black's life started to unravel—he began sending money to strange women over the Internet, lost his job after he allegedly told a 13-year-old she looked "sexy" and touched her inappropriately, and got divorced from wife Jill Rovitzky. In 2015, he pleaded guilty to committing bank fraud.

By 2016, at age 62, Black was homeless, and he checked into the Boulevard Homeless Shelter in East Harlem in January. Three days after he arrived, Anthony White, 21, fatally stabbed him in the neck, allegedly over a missing cell phone (White, who had a history of psychiatric issues, was found dead in the Hudson River of a suspected suicide that March.)

Shortly after Black's death, his ex-wife contacted doctors at Massachusetts General Hospital’s Frontotemporal Disorders Unit to see if they could determine what caused Black's erratic behavior. "I was wrestling with growing suspicions that there was something significantly, organically wrong with him," ex-wife Rovitzky told the Journal News.

Researchers eventually discovered he suffered from frontotemporal dementia, a rare condition that affects about 50,000 people nationwide. Doctors say the condition was likely responsible for Black's odd behavior later in life, including his habit of falling victim to internet scams and bank fraud. Symptoms of patients with "behavioral variant" frontotemporal dementia include making impulsive financial decisions and behaving inappropriately. Black checked the boxes on both of those.

The diagnosis brought little comfort to Black's longtime friend Martin Mosbacher, who told the Journal News, "It’s good to know that there’s some explanation behind his behavior. [But] it doesn’t change the fact that here’s somebody you’ve known for 50 years, and he’s suddenly going mad."