fixed problem with handling of arrays