Es restart connection bug

Closes #1008.