If they are not, they shouldn't be leaving.
Rehabilitation should be to make it so horrible a place to be, that no one would dare wish to go there, or do crimes, to return there, because they cannot handle the outside world.
Rapists and murderers should NOT serve time, but be dispatched.