fix unittest and Counter problems with 2.6