How the criminal justice system fails the mentally ill