fixed segfault on new client