d'oh... remember to unmark edges before every run of BFS
also, add debug info