fixed handling of arrays [bug]