Fix: logic of setting/removing attributes
Remove: strlen() check
Enhance: idb