fix segfault, print works