Fixed some bugs with my Dijkstra's algorithm