fix url function