In section 74(6) of the Mental Health (Scotland) Act 1984 (c.36) (application, in circumstances where a person is released from a sentence of imprisonment, of provisions relating to transfer directions and restriction directions), at the end there shall be inserted “ or otherwise ”.