adjust z index for grid viewer