fix to preview mode