more graceful initialization of modals