fixed invalid merging.