-- fixed missing 'var' for isExtended