More changes to make cluster master/slave setup work properly