fix attributes sort