Fix for discrete value handling