fix for when results return nil to actually return empty array