Fixes regression bug removing chars on baseUrl

Fixes #340
Fixes #338