Fixed some bugs in mul code.
Merge remote-tracking branch 'wbhart/cubic' into cubic