Judge says the case was more of a mental health issue than a criminal justice issue