         let change = Float(changeCount) / Float(self.numCells)
 //        NSLog("\(change * 100.0)%% change since last check.")
 
-        if change < 0.001 {
+        let liveCells = self.cpuCellsBuffer.filter({$0 > 0}).count
+//        NSLog("\(liveCells) live cells.")
+        
+        if change < 0.001 || liveCells == 0 {
             self.needsReset = true
         }
     }
 
     func resetBuffers() {
-        let pixelSpacing: Float = (3.0 / 128.0)
-        let gridSpacing: Float = (40.0 / 3.0)
-        let unitDimensions: float2 = float2(Float(self.bounds.width) * pixelSpacing, Float(self.bounds.height) * pixelSpacing) * 0.5
-        
+        let unitDimensions = float2(Float(self.viewBounds.width) * pixelSpacing, Float(self.viewBounds.height) * pixelSpacing) * 0.5
+
         (self.layer as! CAMetalLayer).drawableSize = CGSize(
-            width: self.bounds.width * self.layer!.contentsScale,
-            height: self.bounds.height * self.layer!.contentsScale
+            width: self.viewBounds.width * self.layer!.contentsScale,
+            height: self.viewBounds.height * self.layer!.contentsScale
         )
         
         let ortho = makeOrthoMatrix(left: -unitDimensions.x, right: unitDimensions.x, bottom: -unitDimensions.y, top: unitDimensions.y, near: -1.0, far: 1.0)


        super.init(coder: coder)
        self.wantsLayer = true
    }

    override init(frame: NSRect) {

    }

    func render() {
        // // removing for threading issues; purely aesthetic anyway
        // if (self.inLiveResize) {
        //     return
        // }

        if (self.needsReset) {
            self.resetBuffers()
