fixing a bug in edit view.