fix preview bug