Does this code works?
This IF compares Attributes with AttributeValues? It should ever return false!