fixed $url undefined error

I added parameter $url to pass it right.