Bug fix in cross product encoding.