added option to deactivate closing dialog