Memory leak in background worker