Fixed invalid use of object in array context