Fixed innerProduct inefficiency.