fix for preview-mode

add preview mode