Various bug fixes related to the C switch.