fix usage of matrix2d