Fixed bug when recent len is < maxrecents