rsfastcentrality2: potential NaN fix for unix