Improved reference resolution.