fix error when statistic_pos undefined