src: Misc fixes