fixed wrong merging