CS fixes
Merge pull request #6224 from GrahamCampbell/5.0-cs

[5.0] CS Fixes