Fix bug causing trouble for es_sync_stats