Remove seg fault still not correct

Removed the segmentation fault, but the engine pointer is not correct.
May need to make volatile.