potential level calculation updated

In case when upperL == 1, control did not enter the main loop. Now 1st
iteration brought out.