fix issue of multiple modals