segfault example added, various fixes