fixed bug with combinePointArrays function