Fixed ISSUE #12 (Segfault while ksize greater than 4M)