Trying to Debug the SegFault