fix numeric comparison related to NUMNODES and REPLICA_CNT