use AbsSqrt instead of ZeroSqrt to avoid division by zero