fixed issue #1 ability to correctly handle arrays