ERT-757 - Changed division by zero check to increase platform compatibility