Bugfixes for preview rendering.