fix error thrown when getting object from URL