fixed a bug with hiding all modals