Fix for some divison by zero errors during update repository