fixing cpml bugs