javascript: modules list generation fixed