Avoid possible divide-by-zero error.