Added quant cast code in preferences