Handle empty URLs better.