Fix a truly horrid regression in the sample viewer...