fix segfault on data