minor fixes
change count and logging