Fix problem in loading dialog from server