fixed merging bug