Correct de seg fault when erasing a block