fixed progress when entering foreground