Fix segfault in empty blocks