update toArray() and toObject() issue