Fixed a bug with jailing.