Fix multiple minor bugs/regressions