Fixed merge functions