updated preview generation pipeline. fixed minor bugs