NGXCBM-6 Fix segfault (in a bit hackish way)