Court orders resentencing for death row inmate