Fixing bug of save in edit