fix bug where the loop variable was being set to the pointer instead of the value of the pointer (points in bin_points)