fixes for addExtraClass and setAttribute