Fixed ref issue.