Fixed a small bug in the stub generator and added the java script header prefix;