jail infinite loop fix