Fix background task test

This works for me now here. What you think?