merge fix from 2.8 branch: clear currchain while regen chain