fix bug with competing modals;