Correct determinant calculation.  Closes #21.