bugfix:
reshapeMG() throws an error if !all items have the same number of categories