Fix possible server packet crash.