fixing num/toReal issue