Changed to use global z-index variable

Changed to use global z-index variable