matrix bug