fix merge and add protocol