fix div by zero
remove some strage error logging