Fix wrong edit code