feature #1664: Fix instantiate dialogs