Fix bug where point code gets corrupted on CPG