Fixes modal closing bug which was preventing click actions in the container