Fixed more segfaults