LPS-40371

Please check out my modifications.

I made some local tests, everything looks fine to me. But could not be sure how to actually test the background tasks.