         }
         let verticalMiddle = imageHeight / 2
         for (x, sample) in samples.enumerate() {
-            let height = CGFloat(sample - min) * sampleDrawingScale
+            let height = (sample - min) * sampleDrawingScale
             CGContextMoveToPoint(context, CGFloat(x), verticalMiddle - height)
             CGContextAddLineToPoint(context, CGFloat(x), verticalMiddle + height)
             CGContextStrokePath(context);

        let readerOutput = AVAssetReaderTrackOutput(track: assetTrack, outputSettings: outputSettingsDict)
        readerOutput.alwaysCopiesSampleData = false
        reader.addOutput(readerOutput)
        var channelCount = 1
        let formatDesc: [AnyObject] = assetTrack.formatDescriptions
        for item in formatDesc {

            scaledProgressWidth = CGFloat(progressSamples - zoomSamples.startIndex) / CGFloat(zoomSamples.count)
        }
        let childFrame = CGRectMake(frame.size.width * scaledX, 0, frame.size.width * scaledWidth, frame.size.height)
        image.frame = childFrame
        highlightedImage.frame = childFrame
        clipping.frame = CGRectMake(0, 0, self.frame.size.width * scaledProgressWidth, self.frame.size.height)
