Various server-side fixes