fix some div0 errors