fix hang when mongoexport exports 0 records