corrected corrfcn calculation (needed to rezero position arrays)