Matrix determinant code fixed