         self.completionBlock = { [weak self] in
             guard let `self` = self else { return }
             self.completionHandler(self.renderedImage)
+            self.renderedImage = nil
         }
     }
     

                self.waveformImage = image
                self.cachedSampleRange = (image != nil) ? renderSampleRange : nil
                self.renderingInProgress = false
                self.setNeedsLayout()
                self.delegate?.waveformViewDidRender?(self)
            }
        }
        self.waveformRenderOperation = waveformRenderOperation
        // TODO: set other values here or require a context to be passed in
        waveformRenderOperation.sampleRange = renderSampleRange
        waveformRenderOperation.imageSize = CGSize(width: widthInPixels, height: heightInPixels)
        waveformRenderOperation.horizontalTargetOverdraw = horizontalTargetOverdraw
        waveformRenderOperation.verticalTargetOverdraw = verticalTargetOverdraw
        waveformRenderOperation.noiseFloor = noiseFloor
        waveformRenderOperation.start()
    }
}


        print("rendering")
        
        let displayRange = zoomEndSamples - zoomStartSamples
        guard displayRange > 0 else { return }

