fix bug in attribut check