Dijkstra's Algorithm what is wrong int this code?