try to fix segmentation fault error