added auto refresh when resuming from background