Fix a few nil pointer bugs in the block directory.