Minor speedup in rendering loop, bugfix in preview progress calculation