Bug in generateVectorField