fixed bug in cps