Fix ReferenceErrors.