zero determinant fix

det() works great now when matrix is singular