Added array support, fixed a bug processing non-string values