Bug fix on edits