Fixed server bugs.