fixed error in merging