Bug fix: handles clients randomly hitting ctrl-c