fix url undefined error