fix segfault on undo, ref #135