Added multiPublishScript, and fixed MongoDB index bug