Some fixes for CS integration