Bug fix in JavaScript doc generation