fixed a bug in server