fix lastest bugs,and it can run as a example