$url undefined warning fix