Court ruled inmate could refuse insanity plea