fix segfault on checkout