serverd: fix more bugs