fix bug in diff_pos2.py