this addresses empty matrix (#191)