     @context.moveTo domain.x0, 0
     @context.lineTo domain.x1, 0
 
-    @stroke 'rgba(0,0,0,1)'
-
-    @end()
+    @restore()
+    @lineWidth = 1
+    @strokeStyle = 'rgba(0,0,0,1)'
+    @stroke()
 
 class Grid extends Layer
   constructor: (transforms)->

  _render: (domain)->
    scale = exp(floor(log(16/domain.diagnal())/ln2)*ln2)

    @begin()

    for i in [floor(domain.x0*scale)..ceil(domain.x1*scale)]
      if i == 0

      @context.moveTo domain.x0, i/scale
      @context.lineTo domain.x1, i/scale

    @restore()
    @lineWidth = 1
    @strokeStyle = 'rgba(0,0,0,0.125)'
    @stroke()

class Fractal extends Layer

