Fixed weird NPE when server is killed while client is running