Segfault error removed