Fix KeyError: 'url' issue