Fix error in loading modals