CS fixes and test fix