Prevent divide by zero. Issue #7100

Fix for issue #7100 
@penev92 that will create an unnecessary commit.
@Smilex if you hop onto IRC I'm sure someone could walk you through it.