cpp: Further fixes