Fixed merge functionality