Fix MongoDB maintenance script