if both are zero, change the values to prevent division by zero