master: fixing zero division error