bugfix division by zero