CPP bug workaround