Several onLoadSuccess() handling fixed. Syntax error in dialogs.js fix