fix bug when args.server is set to None