Added cpp infinite loop bug