fix bug where zero-length keys caused hang