Fixed segfault in client handler