fixed a bug that occurred when cancelling after trying to edit.