fixing singleton issue in stream worker