fix segfault if NG protocol is not used