fix: get_history was sorting with the wrong key.