segfaults when server runs