solved start and end vertex connections bug