prevent division by zero for 0 value