Fixed reference issues.