fix #1202 invalid url crash

fix #1200
fix #1202 invalid url crash