fix URL invalid exception