fixed bug with undefined url