Fixing bug in merging options