Fixed problem with hidden modals