Fixed API so that object, or URL are returned.