Fix array merge

I have add check for array before the object one. I think it should fix #24