Fix z-indices