Fix array and object merge

Closes #37