fixing image preview