try to fix segmentation fault