Fixed incorrect merging