bugfixes for server-side