fix a very serious server deadlock