Added a case where there is no root given the limit