A segmentation fault appears, but I do not know why