fixing error in js module initialization