References controller bug fix