Segmentation fault on EOR