Lawsuit forces construction of jail