fix background task bug