fixed z index being reset at a higher level than needed which resulted in visual glitches