Removed a divide-by-zero bug.