fix a bug in edit view