fixed some details in merge