fix how it selects the latest entries