fixing global variables between libraries