fixed open/close batch js bug