fix cpp trick bug