Fixed the bug for extreme case. Refs #10224.