Fixing issue where items were not returned as an array