Various fixes to unbreak master