fix num processes bug