fixed image preview bug