Misc fixes3