fixed some funny stuff with matrix sizes