added minimum history limit