fix for when data is not an array