Misc fixes here and there