Fix bug that incorrectly restarted suspended queries