Fixed the canCast mechanism