Misc fixes based on Ubuntu testing