Try to fix segmentation fault