Repaired a devide-by-zero bug.