Fix background tasks working