Small bugfix for getting z-index