fixed in calculating M when only one categroy presented, the object was matrix insted of list. <2013-09-16, Mon>