added a -1 to the running nodes to remove master from teh total number of running nodes