Added guard to merging