Fixed a bug where the argument to setinverse was using the incorrect value.