added stopping for polling tasks.