fix typo in darray merging function