bug fix in background worker