Fix crash caused by unregistering animation listener

Change-Id: I874ea6f077f593849deb28f723f2da52d018e7a5