Fix for logs count when logs are removed in setInterval