Fixed a zero division bug.