diff --git a/lib/scanlinescheme.js b/lib/scanlinescheme.js
index <HASH>..<HASH> 100644
--- a/lib/scanlinescheme.js
+++ b/lib/scanlinescheme.js
@@ -81,7 +81,7 @@ ScanlineScheme.prototype.toJSON = function() {
     }
 
     // Align resulting pos to a metatile boundary.
-    if (pos.x >= this.bounds[pos.z].minX) {
+    if (this.bounds[pos.z] && pos.x >= this.bounds[pos.z].minX) {
         pos.x = pos.x - (pos.x % this.metatile) - this.metatile;
         pos.y = pos.y - (pos.y % this.metatile);
     }
Ensure bounds is set for the given zoom level. When render finishes, zoom may be maxzoom<I>.