fix some code