Restore changes lost in merge

Wow I could not have messed this merge up more if I had tried, apologies to all.