Fix problem with cas