When the revolution broke out in Ireland Swift fled to England where he got a job as secretary to the diplomat William Temple

What is the correctly punctuated version of this sentence?
When the revolution broke out in Ireland, Swift fled to England where he got a job as secretary to the diplomat William Temple.