fixed NaN when normalising 0 length vector