Added resorting on attribute change