fix for #276 and a fix for a dangling usync global reference