Fix document edit