bug in the matrix