allow state loss prevents crash when app is put in background while task is executed