cp_sync_py: fixed bug where results got worse over time. freq_sync_py: cosmetic changes