Fix segfault.

Segfault occured when new block generated (instead of loading from disk).