Add cpp check and fix