callBack animationFun and bug fixes