Fixed some bugs related to CForm