Fix logic composing url