added better support for serialized arrays