Fix subtle bug in the hidden paths algorithm
Fixed memory leak in ShortestPaths class