fix url parsing