fix bug in merge dataset