[DEV]fix avarage & variant 's problem of returning ref