Fixes #646 issue with z-index on modal close