corrected a bug where binding dialog was not dismissed