Fix statistics
Fix documentation and diagnostic output