Fix memory leak

Fixed memory leak cause by passing activties to worker classes which
were created often