fixed error reporting bugs in array and object