fixed bugs in server, see BugsFixed_and_TODO.txt