Fixed a potential bug in CASUtils