Prevent djikstra exception when start is surrounded

Fixes #40