bug fixes to modals