Fixing outer product bug