fix possible crash when printing complex urls