Changed the way ProgressForeground was set. It may help with #1149