fix reference order