Fix how urls are constructed