correcting return type of kms
scalar and expression det and rcond have compatible return types