bug fix

do the correct matrix math.