(2) Where any person is detained in any mental hospital under the provisions of this section, it shall be the duty of the Medical Superintendent of such hospital, if and when he or she is satisfied that such person is of sound mind, to certify accordingly to the Governor General and to state in his or her certificate whether in his or her opinion such person has been of unsound mind at any time subsequent to the passing of the sentence, and upon receipt of such certificate, the Governor General shall, by warrant under his or her hand, direct—
-
(a) if the term of imprisonment of such person has expired, that such person be discharged;
-
(b) if such person still remains liable to imprisonment or other sentence, that he or she be removed to the appropriate prison or place to undergo such sentence, or, if not under sentence, to be dealt with according to law, as if no warrant for his or her removal to a hospital had been issued; however, if such person is under sentence of death which has not been commuted such sentence shall not be carried out if the Medical Superintendent has certified that such person has been of unsound mind at any time subsequent to the passing of the sentence and in such case the Governor General shall commute such sentence.