CS fix
(cherry picked from commit cf8f941)
(cherry picked from commit 51efd58)