fix bug in server