PLOT: tweaked the dist and nvl plotting code