hidden percent and max information in ProgressBar sample fixes #301

Thought this was the easiest way to fix #301. Tell me what you think.
It seems we say "if event.value is NaN let's use it for the the value". Is my interpretation correct? If yes I'm surprised it works, which value can we get from NaN?