Fix bug in mat_decompose.