handle url correctly