Bugfix, avoid zero division