fix bugs in background update