fix bug with multiple modals in DOM