register and format exports handling fixes
better script injection, race condition handling