fixed image preview breaking when switching ortientation