fix js,make function run after modules loaded