fix callback function in `server.kill`