Issue292 Handled case of maxTocLevel=0 or not set