fixing the Merging problems