dialogs.js improvement.