Correction bugs segfault