fix preview mode
fix preview mode logic