Fixed counter exception that crashes the pipeline