Remove isInfinity and if() statement.