fix major lag when restoring from background