Corrects url handling on each function