fix bug with static script bundling