Fixed segmentation fault with uncapacitated