Fixed problems with matrix notation