Fixing vectorization code.