fix segfault on 1-1 readin
Fixed buffer segfault