fixed bug/typo in adjacency matrix class detection