Fix array sort