Adds/removes active tasks only once