fix some code junks