Javascript fixes, last version of the agent