Fixed some references issues.