Fix undefined length when no topics returned. Fixes #1