Fixed the reference issues.