Fixed auto merging issues