fixed bug with modals and overlay