ACT-1641 found a few more places where the the url gets rewritten in a way that might corrupt the host name
Merge pull request #61 from gtudan/ACT-1641

ACT-1641 - rewriting url might corrupt hostname