Remove attribute after the property is set to null. Fixes issue 165