Fixed a bug with cancel edit.