fix master server selection