fix and test for "mergeMetaCallResult" function