fix some foolish codes