Fix bug in Resource.prototype.get()