fixed javascript generator/extractor