Bugfix: we had degenerated matrices in some cases.