Fixed Strongly Connected Component algorithm