some minor corrections to merge operation