bugfix for modals