Made sure there will not be division by 0 errors or errors for using undefined value as an array ref
Made sure there will not be division by 0 errors or errors for using undefined value as an array ref



Former-commit-id: 5759cd3415485b3ba74535e9386d0c9f5819f487
julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine