Added check for undefined constants.