try to fix the number of items printing bug