Moved reference processing earlier.