handle global vars properly in usedecl