NaN stands for 'Not a Number'
If it's something that works on preview, but breaks on export it could be a bug.
But it sounds like it could be fixed anyway..
I don't know your context exactly but I think rounds is being set to a string from however your saving it.
Can you convert it to an Integer when the value is retrieved? using Int(value)