More or less fixed merging issues