fix the reference order