Correct functions for zIndex handling