fix for 'TypeError: Unable to get property 'isLocal' of undefined or null reference'