Better fix for #193

Now fixes the problem with unassigning as well