fixed #20 division by 0