Added segfault changes