Fixing an error in the compressed versions, adding a max history