Fix ASAN related crash in nk format