fixed issue with closing edit dialog