fixed server bugs