Some generic bugfixes.

WARNING: The server installation is misbehaving at the moment.