Misc fixes / improvements