fix bug in ::merge