Adding Werror, Segmentation Fault problem