Fixed a bug in the edit view