more precise message stats + minor bugfixes