fix bug in switching between activity and overview when refreshing the browser