fixed a minor bug in, boxcounter