Fixed the issue with periphery and core nodes while merging