improved fault tolerance of keepnum option