fix issues with js module initialization