Remove some unnecessary code that now causes a segfault