fix QUIT processing with flood protection

Closes #138.