fix global namespace & foreign libs bug