Fix relative url handling