fix probably segfault