Fix crash on debug build