fixed edit mode display and closed modal after edit