Fix head mismatch bug introduced by previous commit