Fixes dialog overlay z-index bug