Fix gen cp.