         
         if !manualZoomed || shouldScale {
             
-            let zoomScale = scrollView.zoomScaleToBound()
-            
-            scrollView.setZoomScale(zoomScale, animated: false)
-            scrollView.minimumZoomScale = zoomScale
+            scrollView.minimumZoomScale = scrollView.zoomScaleToBound()
+            scrollView.zoomScale = scrollView.minimumZoomScale
             
             manualZoomed = false
         }

        originalPoint = convertPoint(scrollView.center, toView: self)
        
        updateMasks()
        
        setImageRotation(previousAngle)
    }
    
    private func updateMasks(animated animated: Bool = false) {

            scrollView.contentOffset.x = scrollView.contentSize.width - scrollView.bounds.size.width
        }
    }
    
    private func reset() {
        scrollView.transform = CGAffineTransformIdentity
        scrollView.minimumZoomScale = 1
        scrollView.zoomScale = 1
    }
}

private class PhotoScrollView: UIScrollView {
