Remove unnecessary infinity check