Fix server crashing