update code: fix some error