improved stat collection, fixed stat delivery if message size > 1024