Misc fixes and adjustments