Fixed bug in handling of multiple arrays