Fixed bug in attributeChanged handling