Fix process counter problem