Fixes for dedicated server environment.

Not fully tested or fixed.