fixex some cs bugs