Fixed the effect that the spinner stayed in dom when doing browser back