critical bug: background tasks were run as foreground