Fixed bug in FindCMSType