Fixed some bugs in server management