added in check if app loses active screen reset the animation