Fix segfault in hmode.