Stopping animation when props are changed