Wait until master is available