Adjacency matrix constructed. Max counter stack corrupted