Improve loading of modals