Prevented divide-by-0 errors