Saves buffer on InsertLeave