merge method error

This changes seems to work for me.  idx is not initiated in the current master and results in an error on attempted merge.