fix bug in reloadDialog when behaviors are defined