Improved preview mode handling.