Fix error on startup because of history size being too large