fixed the bug caused by null url