Adding animation end callback.