added more checks for jail creation