Fixing the appending of points to the return vector