Fixed issues in merging