bug fix in server.R