Fix bug: use mask for the c states