dixed a bug for dialog