improved behaviour of creation and dismissal of modal views