Fixed merge implementation