fix bug for reference