Removed segfault errors