Fix bugs related with server