visited[start_position] must be set to true, this fixes bug