Fixing a z-index bug