Tidy up some issues with the merge from master