Added fix for fatal error during worker cleanup
Added running_count method to Mediator