fix segfault on history browsing, ref #135