Fixed potential division by zero for empty statistics