Fixed annoying segfault