Fix compile warnings, hash segfault isolated