diff --git a/sparse/dok.py b/sparse/dok.py
index 65ede6f..9beaada 100644
--- a/sparse/dok.py
+++ b/sparse/dok.py
@@ -339,8 +339,11 @@ class DOK(object):
                 raise IndexError('All indices must be slices or integers'
                                  ' when setting an item.')
 
+        key = tuple(key_list)
         if value != _zero_of_dtype(self.dtype):
-            self.data[tuple(key_list)] = value[()]
+            self.data[key] = value[()]
+        elif key in self.data:
+            del self.data[key]
 
     def __str__(self):
         return "<DOK: shape=%s, dtype=%s, nnz=%d>" % (self.shape, self.dtype, self.nnz)

diff --git a/sparse/tests/test_dok.py b/sparse/tests/test_dok.py
index 568c1d0..45c9899 100644
--- a/sparse/tests/test_dok.py
+++ b/sparse/tests/test_dok.py
@@ -149,3 +149,12 @@ def test_float_dtype():
     s = DOK((5,), data)
 
     assert s.dtype == np.float32
+
+
+def test_set_zero():
+    s = DOK((1,), dtype=np.uint8)
+    s[0] = 1
+    s[0] = 0
+
+    assert s[0] == 0
+    assert s.nnz == 0

Setting DOK elements to zero doesn't work.
Trivial example:

```
>>> import sparse
>>> import numpy as np
>>> s = sparse.DOK((1,))
>>> s[0] = 1
>>> s[0]
1.0
>>> s[0] = 0
>>> s[0]
1.0
```
sparse/tests/test_dok.py::test_setitem[shape0-index0-0.8955187055746776] sparse/tests/test_dok.py::test_setitem[shape1-index1-0.3518569369389797] sparse/tests/test_dok.py::test_setitem[shape3-1-0.23848692220254797] sparse/tests/test_dok.py::test_setitem[shape4-index4-0.22260470500706064] sparse/tests/test_dok.py::test_setitem[shape5-index5-0.7520164007372592] sparse/tests/test_dok.py::test_setitem[shape9-index9-0.4678733721507552] sparse/tests/test_dok.py::test_setitem[shape11-index11-0.02529711593219741] sparse/tests/test_dok.py::test_setitem[shape13-index13-0.5484454606790654] sparse/tests/test_dok.py::test_set_zero
sparse/tests/test_dok.py::flake-8::FLAKE8 sparse/tests/test_dok.py::test_random_shape_nnz[0.1-shape0] sparse/tests/test_dok.py::test_random_shape_nnz[0.1-shape1] sparse/tests/test_dok.py::test_random_shape_nnz[0.1-shape2] sparse/tests/test_dok.py::test_random_shape_nnz[0.3-shape0] sparse/tests/test_dok.py::test_random_shape_nnz[0.3-shape1] sparse/tests/test_dok.py::test_random_shape_nnz[0.3-shape2] sparse/tests/test_dok.py::test_random_shape_nnz[0.5-shape0] sparse/tests/test_dok.py::test_random_shape_nnz[0.5-shape1] sparse/tests/test_dok.py::test_random_shape_nnz[0.5-shape2] sparse/tests/test_dok.py::test_random_shape_nnz[0.7-shape0] sparse/tests/test_dok.py::test_random_shape_nnz[0.7-shape1] sparse/tests/test_dok.py::test_random_shape_nnz[0.7-shape2] sparse/tests/test_dok.py::test_convert_to_coo sparse/tests/test_dok.py::test_convert_from_coo sparse/tests/test_dok.py::test_convert_from_numpy sparse/tests/test_dok.py::test_convert_to_numpy sparse/tests/test_dok.py::test_construct[2-data0] sparse/tests/test_dok.py::test_construct[shape1-data1] sparse/tests/test_dok.py::test_construct[shape2-data2] sparse/tests/test_dok.py::test_getitem[0.1-shape0] sparse/tests/test_dok.py::test_getitem[0.1-shape1] sparse/tests/test_dok.py::test_getitem[0.1-shape2] sparse/tests/test_dok.py::test_getitem[0.3-shape0] sparse/tests/test_dok.py::test_getitem[0.3-shape1] sparse/tests/test_dok.py::test_getitem[0.3-shape2] sparse/tests/test_dok.py::test_getitem[0.5-shape0] sparse/tests/test_dok.py::test_getitem[0.5-shape1] sparse/tests/test_dok.py::test_getitem[0.5-shape2] sparse/tests/test_dok.py::test_getitem[0.7-shape0] sparse/tests/test_dok.py::test_getitem[0.7-shape1] sparse/tests/test_dok.py::test_getitem[0.7-shape2] sparse/tests/test_dok.py::test_setitem[shape2-index2-value2] sparse/tests/test_dok.py::test_setitem[shape6-index6-value6] sparse/tests/test_dok.py::test_setitem[shape7-index7-value7] sparse/tests/test_dok.py::test_setitem[shape8-index8-value8] sparse/tests/test_dok.py::test_setitem[shape10-index10-value10] sparse/tests/test_dok.py::test_setitem[shape12-index12-value12] sparse/tests/test_dok.py::test_default_dtype sparse/tests/test_dok.py::test_int_dtype sparse/tests/test_dok.py::test_float_dtype