fixed year bug in generate_kpap (thanks Brian)