javascript: namespace generation fixed