fixed Math.DomainError