Misc fixes