fix Fatal error: Cannot use Object as array,  is an Object not an array