Fix bug when setting once removed attribute has no effect.