Fixed crash with invalid URLs