Fix ASAN crash (still needs better valid)