Added case handling for attribute changes.