Joseph made viceroy