bug fix in cas