fix EXTThread scoping issues