preview_mode cleanup