Fix bug when only one stop is returned by API, Add tests