Fix residual merge issues