Possible fix for the many-modals problem