fix bug while merging