Fixes [#1] - array merging problem in closeIoResponse. Also creates test for this.

Fixes [#1] - array merging problem in closeIoResponse. Also creates test for this.