fix object merge bug
re-implement array merging