Quick fix for crash at setting tag's attributes