Added checkInGlobal procedure.