fixed primary management server lookup logic