Small fix

added typecast of resource object to array