fix a bug in server.R