fixed preview bug