Cpp template not working - fixes #129