kill animation when leaving the page