Fix a bug in which dense matrices were forced to be the default, instead of letting ML decide