Bugfixes to server