Fixed mergeParameters method