Tax errors put millions of pensions in jeopardy