fix segfault when there are more than 128 log entries

Might fix #318