Fixed bug in getIngredientsMatrix()