Fix some substitution in merge history